---
output: 
  bookdown::pdf_document2:
    toc: false
    citation_package: natbib
    fig_caption: yes
    latex_engine: pdflatex
    template: ~/Dropbox/Harvard/pandoc-default-latex.tex
    keep_tex: true
always_allow_html: true
title: "Racial Attitudes and Views of Disaster: Secondary Appendix"
abstract: false
author: 
- name: "Martin Gilens"
  affiliation: "University of California, Los Angeles"
  email: gilens@ucla.edu
  orcid_id: 0000-0001-5485-6275
- name: "Tali Mendelberg"
  affiliation: "Princeton University"
  email: talim@princeton.edu
  orcid_id: 0000-0002-4494-7541
- name: "Nicholas Short"
  affiliation: "Princeton University"
  email: nick.short@princeton.edu
  orcid_id: 0000-0002-2401-8315
date: "`r format(Sys.time(), '%B %d, %Y')`"
header-includes:
    \usepackage{mathtools}
    \usepackage{natbib}
    \usepackage{pdflscape}
    \usepackage{longtable}
    \usepackage{setspace}
    \usepackage{pdfpages}
    \usepackage{caption}
    \captionsetup[table]{font=large}
    \pagenumbering{gobble}
geometry: margin=1in
fontfamily: mathpazo
fontsize: 12pt
linestretch: 2
bibliography: manuscript.bib
biblio-style: apsr2006.bst
---
\thispagestyle{empty}

\clearpage
\pagenumbering{arabic} 

\pagebreak

```{r setup, include=FALSE}

knitr::opts_chunk$set(echo = FALSE)
library(tidyverse)
library(estimatr)
library(survey)
library(kableExtra)
```


```{r subset-data}

load("manuscript-2-datasets.RData")

# Combine the surveys, add survey_year as a variable; keep subset of variables used in analysis

combined_surveys <- survey_1_data %>% mutate(survey_year = "2021") %>%
  bind_rows(survey_2_data %>% select(-rr_index) %>% mutate(survey_year = "2023")) %>% 
  mutate(survey_year = factor(survey_year, levels = c("2021", "2023"))) %>%
  select(more_spending, more_spending_binary, more_relief, more_prevention, prefer_prevention_alt, 
         age, gender, educ, income, party, race_alt, black_multi, rr_index_alt, survey_year, weights)

# Create B/W only samples for mediation analysis and combine them

survey_1_data_bw <- survey_1_data %>% 
  filter(race_alt %in% c("Black", "White")) %>%
  mutate(race_binary = case_when(race_alt == "Black" ~ 1,
                                 TRUE ~ 0))

survey_2_data_bw <- survey_2_data %>% 
  filter(race_alt %in% c("Black", "White")) %>%
  mutate(race_binary = case_when(race_alt == "Black" ~ 1,
                                 TRUE ~ 0))

combined_surveys_bw <- survey_1_data_bw %>%
  bind_rows(survey_2_data_bw) %>%
  select(ResponseId, more_spending, race_binary, age, age_contin, gender, gender_binary, 
         educ, educ_fine, income, income_numeric, party, party_7p_numeric, rr_index_alt, 
         weights)

# Create "White" (non-Black and non-Latinx) samples for each survey

survey_1_white <- survey_1_data %>%
  filter(!race_alt %in% c("Black", "Latinx"), # Drop those who select Latinx or only Black race
         black_multi == 0) # Drop those who selected Black in combination with some other race

survey_2_white <- survey_2_data %>%
  filter(!race_alt %in% c("Black", "Latinx"), 
         black_multi == 0) 
  
combined_surveys_white <- combined_surveys %>%
  filter(!race_alt %in% c("Black", "Latinx"), 
         black_multi == 0) 

# Create "White" (non-Black and non-Latinx) subsets for certain wording conditions in the 2023 survey

survey_2_only_nph_white <- survey_2_white %>%
  filter(condition == "natural_and_health_disasters")  %>%
  select(ResponseId, more_spending, age, gender, educ, income, party, rr_index_alt, weights) 
   
survey_2_not_nph_white <- survey_2_white %>%
  filter(condition != "natural_and_health_disasters") %>%
  mutate(condition = factor(condition, levels = c("natural_disasters", "health_disasters"))) 

# Create "White" (non-Black and non-Latinx) and Black respondent subsets of the reasons data

rr_reasons_data_white <- rr_reasons_data %>%
  semi_join(survey_1_white, by = "ResponseId")

rr_reasons_data_black <- rr_reasons_data %>%
  filter(race_alt == "Black")

# Create design objects for the 2023 survey and the combined surveys

survey_2_design <- svydesign(id = ~1, weights = ~weights, data = survey_2_data, na.rm = T)
combined_surveys_design <- svydesign(id = ~1, weights = ~weights, data = combined_surveys, na.rm = T)

```

The code in this file generates each of regression tables needed to generate the secondary appendix. It is sufficient to simply run all chunks to generate tables in the `/regression-tables/` sub-folder. If compiled or knitted, the output will simply show the text of each hypothesis.

# Hypothesis 23b {-}

"H23b. Disaster spending support is predicted by the stereotype of Black laziness even after controlling for each of the following in turn:
1)	Racial sympathy
2)	Racial resentment  
3)	Index of the other two Black stereotypes (violence and intelligence)
4)	Black violence stereotype
5)	Black intelligence stereotype 
6)	Latino laziness stereotype 
7)	Index of all Black and Latinx stereotypes except Black laziness"

```{r h23b-tab, include = FALSE}

h23b_lm_1 <- lm(more_spending ~ age + gender + educ + income + black_laziness + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h23b_se_1 <- sqrt(diag(sandwich::vcovHC(h23b_lm_1, type = "HC1")))

h23b_lm_2 <- lm(more_spending ~ age + gender + educ + income + black_laziness + rr_index, data = survey_2_white, weights = weights) 
h23b_se_2 <- sqrt(diag(sandwich::vcovHC(h23b_lm_2, type = "HC1")))

h23b_lm_3 <- lm(more_spending ~ age + gender + educ + income + black_laziness + stype_index_black_not_laziness, data = survey_2_white, weights = weights) 
h23b_se_3 <- sqrt(diag(sandwich::vcovHC(h23b_lm_3, type = "HC1")))

h23b_lm_4 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_violence, data = survey_2_white, weights = weights) 
h23b_se_4 <- sqrt(diag(sandwich::vcovHC(h23b_lm_4, type = "HC1")))

h23b_lm_5 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_intelligence, data = survey_2_white, weights = weights) 
h23b_se_5 <- sqrt(diag(sandwich::vcovHC(h23b_lm_5, type = "HC1")))

h23b_lm_6 <- lm(more_spending ~ age + gender + educ + income + black_laziness + latinx_laziness, data = survey_2_white, weights = weights) 
h23b_se_6 <- sqrt(diag(sandwich::vcovHC(h23b_lm_6, type = "HC1")))

h23b_lm_7 <- lm(more_spending ~ age + gender + educ + income + black_laziness + stype_index_black_not_laziness, data = survey_2_white, weights = weights) 
h23b_se_7 <- sqrt(diag(sandwich::vcovHC(h23b_lm_7, type = "HC1")))

h23b_lm <- list(h23b_lm_1,
                h23b_lm_2,
                h23b_lm_3,
                h23b_lm_4,
                h23b_lm_5,
                h23b_lm_6,
                h23b_lm_7)

h23b_se <- list(h23b_se_1,
                h23b_se_2,
                h23b_se_3,
                h23b_se_4,
                h23b_se_5,
                h23b_se_6,
                h23b_se_7)


h23b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Black laz. stereo.", 
                 "Racial unsympathy",
                 "Racial resent. (4-item index) ", #
                 "Black viol. and intell. stereo. (2-item index)", # (3-item index) 
                 "Black viol. stereo.", 
                 "Black intell. stereo.", 
                 "Latinx laz. stereo.",
                 "Latinx viol. and intell. stereo (2-item index)",
                 "Constant")

stargazer::stargazer(h23b_lm,
                     se = h23b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h23b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h23b-tab",
                     out = "regression-tables/sec-app-h23b-tab.tex",
                     title = "Test of hypothesis 23b"
                     )
```


```{r h23b-with-party-tab, include = FALSE}

h23b_lm_1 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h23b_se_1 <- sqrt(diag(sandwich::vcovHC(h23b_lm_1, type = "HC1")))

h23b_lm_2 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + rr_index, data = survey_2_white, weights = weights) 
h23b_se_2 <- sqrt(diag(sandwich::vcovHC(h23b_lm_2, type = "HC1")))

h23b_lm_3 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + stype_index_black_not_laziness, data = survey_2_white, weights = weights) 
h23b_se_3 <- sqrt(diag(sandwich::vcovHC(h23b_lm_3, type = "HC1")))

h23b_lm_4 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + black_violence, data = survey_2_white, weights = weights) 
h23b_se_4 <- sqrt(diag(sandwich::vcovHC(h23b_lm_4, type = "HC1")))

h23b_lm_5 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + black_intelligence, data = survey_2_white, weights = weights) 
h23b_se_5 <- sqrt(diag(sandwich::vcovHC(h23b_lm_5, type = "HC1")))

h23b_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + latinx_laziness, data = survey_2_white, weights = weights) 
h23b_se_6 <- sqrt(diag(sandwich::vcovHC(h23b_lm_6, type = "HC1")))

h23b_lm_7 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + stype_index_black_not_laziness, data = survey_2_white, weights = weights) 
h23b_se_7 <- sqrt(diag(sandwich::vcovHC(h23b_lm_7, type = "HC1")))

h23b_lm <- list(h23b_lm_1,
                h23b_lm_2,
                h23b_lm_3,
                h23b_lm_4,
                h23b_lm_5,
                h23b_lm_6,
                h23b_lm_7)

h23b_se <- list(h23b_se_1,
                h23b_se_2,
                h23b_se_3,
                h23b_se_4,
                h23b_se_5,
                h23b_se_6,
                h23b_se_7)


h23b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Black laz. stereo.", 
                 "Racial unsympathy",
                 "Racial resent. (4-item index) ", #
                 "Black viol. and intell. stereo. (2-item index)", # (3-item index) 
                 "Black viol. stereo.", 
                 "Black intell. stereo.", 
                 "Latinx laz. stereo.",
                 "Latinx viol. and intell. stereo (2-item index)",
                 "Constant")

stargazer::stargazer(h23b_lm,
                     se = h23b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h23b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h23b-with-party-tab",
                     out = "regression-tables/sec-app-h23b-with-party-tab.tex",
                     title = "Test of hypothesis 23b, with control for party ID"
                     )
```


# Hypothesis 23c {-}

"H23c. Disaster spending support is better predicted by the stereotype of Black laziness than of Black violence or Black intelligence."

```{r h23c-tab, include = FALSE}

h23c_lm_1 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_violence, data = survey_2_white, weights = weights) 
h23c_se_1 <- sqrt(diag(sandwich::vcovHC(h23c_lm_1, type = "HC1")))

h23c_lm_2 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_violence + party, data = survey_2_white, weights = weights) 
h23c_se_2 <- sqrt(diag(sandwich::vcovHC(h23c_lm_2, type = "HC1")))

h23c_lm_3 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_intelligence, data = survey_2_white, weights = weights) 
h23c_se_3 <- sqrt(diag(sandwich::vcovHC(h23c_lm_3, type = "HC1")))

h23c_lm_4 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_intelligence + party, data = survey_2_white, weights = weights) 
h23c_se_4 <- sqrt(diag(sandwich::vcovHC(h23c_lm_4, type = "HC1")))

h23c_lm_5 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_violence + black_intelligence, data = survey_2_white, weights = weights) 
h23c_se_5 <- sqrt(diag(sandwich::vcovHC(h23c_lm_5, type = "HC1")))

h23c_lm_6 <- lm(more_spending ~ age + gender + educ + income + black_laziness + black_violence + black_intelligence + party, data = survey_2_white, weights = weights) 
h23c_se_6 <- sqrt(diag(sandwich::vcovHC(h23c_lm_6, type = "HC1")))

h23c_lm <- list(h23c_lm_1,
                h23c_lm_3,
                h23c_lm_5,
                h23c_lm_2,
                h23c_lm_4,
                h23c_lm_6)

h23c_se <- list(h23c_se_1,
                h23c_se_3,
                h23c_se_5,
                h23c_se_2,
                h23c_se_4,
                h23c_se_6)

h23c_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Black laz. stereo.",
                 "Black viol. stereo.", 
                 "Black intell. stereo.", 
                 "Party: Independent", "Party: Republican",
                 "Constant")

stargazer::stargazer(h23c_lm,
                     se = h23c_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h23c_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h23c-with-party-tab",
                     out = "regression-tables/sec-app-h23c-with-party-tab.tex",
                     title = "Test of hypothesis 23c"
                     )
```


# Hypothesis 23d {-}

"H23d. Disaster spending support is better predicted by the stereotype of Black laziness than of Latino laziness."

```{r h23d-tab, include = FALSE}

h23d_lm_1 <- lm(more_spending ~ age + gender + educ + income + black_laziness + latinx_laziness, data = survey_2_white, weights = weights) 
h23d_se_1 <- sqrt(diag(sandwich::vcovHC(h23d_lm_1, type = "HC1")))

h23d_lm_2 <- lm(more_spending ~ age + gender + educ + income + black_laziness + latinx_laziness + party, data = survey_2_white, weights = weights) 
h23d_se_2 <- sqrt(diag(sandwich::vcovHC(h23d_lm_2, type = "HC1")))

h23d_lm <- list(h23d_lm_1,
                h23d_lm_2)

h23d_se <- list(h23d_se_1,
                h23d_se_2)

h23d_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Black laz. stereo.",
                 "Latinx laz. stereo.", 
                 "Party: Independent", "Party: Republican",
                 "Constant")

stargazer::stargazer(h23d_lm,
                     se = h23d_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h23d_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h23d-with-party-tab",
                     out = "regression-tables/sec-app-h23d-with-party-tab.tex",
                     title = "Test of hypothesis 23d"
                     )
```

# Hypothesis 23e {-}

"H23e. Disaster spending support is not better predicted by the stereotype of Black laziness than of Black violence or Black intelligence. This is the null hypothesis for H23c."

See analysis for H23c above.

\pagebreak

# Hypothesis 24b {-}

"H24b Disaster spending support is predicted by an index of all Black stereotypes even after controlling for each of the following in turn:
1)	Racial sympathy
2)	Racial resentment 
3)	Index of all Latino stereotypes"

```{r h24b-tab, include = FALSE}

h24b_lm_1 <- lm(more_spending ~ age + gender + educ + income + stype_index_black + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h24b_se_1 <- sqrt(diag(sandwich::vcovHC(h24b_lm_1, type = "HC1")))

h24b_lm_2 <- lm(more_spending ~ age + gender + educ + income + stype_index_black + rr_index, data = survey_2_white, weights = weights) 
h24b_se_2 <- sqrt(diag(sandwich::vcovHC(h24b_lm_2, type = "HC1")))

h24b_lm_3 <- lm(more_spending ~ age + gender + educ + income + stype_index_black + stype_index_latinx, data = survey_2_white, weights = weights) 
h24b_se_3 <- sqrt(diag(sandwich::vcovHC(h24b_lm_3, type = "HC1")))

h24b_lm_4 <- lm(more_spending ~ age + gender + educ + income + party + stype_index_black + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h24b_se_4 <- sqrt(diag(sandwich::vcovHC(h24b_lm_4, type = "HC1")))

h24b_lm_5 <- lm(more_spending ~ age + gender + educ + income + party + stype_index_black + rr_index, data = survey_2_white, weights = weights) 
h24b_se_5 <- sqrt(diag(sandwich::vcovHC(h24b_lm_5, type = "HC1")))

h24b_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + stype_index_black + stype_index_latinx, data = survey_2_white, weights = weights) 
h24b_se_6 <- sqrt(diag(sandwich::vcovHC(h24b_lm_6, type = "HC1")))


h24b_lm <- list(h24b_lm_1,
                 h24b_lm_2,
                 h24b_lm_3,
                 h24b_lm_4,
                 h24b_lm_5,
                 h24b_lm_6)

h24b_se <- list(h24b_se_1,
                 h24b_se_2,
                 h24b_se_3,
                 h24b_se_4,
                 h24b_se_5,
                 h24b_se_6)

h24b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Anti-Black stereo. (3-item index)",
                 "Racial unsympathy",
                 "Racial resent. (4-item index) ", 
                 "Anti-Latinx stereo. (3-item index)",
                 "Constant")

stargazer::stargazer(h24b_lm,
                     se = h24b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h24b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h24b-with-party-tab",
                     out = "regression-tables/sec-app-h24b-with-party-tab.tex",
                     title = "Test of hypothesis 24b"
                     )
```

# Hypothesis 25b {-}

"H25b. Disaster spending support is predicted by racial sympathy even after controlling for each of the following in turn: 
1) Black laziness stereotype
2) Index of all Black stereotypes
3) The general stereotype index 
4) Racial resentment"

```{r h25b-tab, include = FALSE}

h25b_lm_1 <- lm(more_spending ~ age + gender + educ + income + racial_sympathy_anes + black_laziness, data = survey_2_white, weights = weights) 
h25b_se_1 <- sqrt(diag(sandwich::vcovHC(h25b_lm_1, type = "HC1")))

h25b_lm_2 <- lm(more_spending ~ age + gender + educ + income + racial_sympathy_anes + stype_index_black, data = survey_2_white, weights = weights) 
h25b_se_2 <- sqrt(diag(sandwich::vcovHC(h25b_lm_2, type = "HC1")))

h25b_lm_3 <- lm(more_spending ~ age + gender + educ + income + racial_sympathy_anes + stype_index, data = survey_2_white, weights = weights) 
h25b_se_3 <- sqrt(diag(sandwich::vcovHC(h25b_lm_3, type = "HC1")))

h25b_lm_4 <- lm(more_spending ~ age + gender + educ + income + racial_sympathy_anes + rr_index, data = survey_2_white, weights = weights) 
h25b_se_4 <- sqrt(diag(sandwich::vcovHC(h25b_lm_4, type = "HC1")))

h25b_lm_5 <- lm(more_spending ~ age + gender + educ + income + party + racial_sympathy_anes + black_laziness, data = survey_2_white, weights = weights) 
h25b_se_5 <- sqrt(diag(sandwich::vcovHC(h25b_lm_5, type = "HC1")))

h25b_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + racial_sympathy_anes + stype_index_black, data = survey_2_white, weights = weights) 
h25b_se_6 <- sqrt(diag(sandwich::vcovHC(h25b_lm_6, type = "HC1")))

h25b_lm_7 <- lm(more_spending ~ age + gender + educ + income + party + racial_sympathy_anes + stype_index, data = survey_2_white, weights = weights) 
h25b_se_7 <- sqrt(diag(sandwich::vcovHC(h25b_lm_7, type = "HC1")))

h25b_lm_8 <- lm(more_spending ~ age + gender + educ + income + party + racial_sympathy_anes + rr_index, data = survey_2_white, weights = weights) 
h25b_se_8 <- sqrt(diag(sandwich::vcovHC(h25b_lm_8, type = "HC1")))

h25b_lm <- list(h25b_lm_1,
                h25b_lm_2,
                h25b_lm_3,
                h25b_lm_4,
                h25b_lm_5,
                h25b_lm_6,
                h25b_lm_7,
                h25b_lm_8)

h25b_se <- list(h25b_se_1,
                h25b_se_2,
                h25b_se_3,
                h25b_se_4,
                h25b_se_5,
                h25b_se_6,
                h25b_se_7,
                h25b_se_8)

h25b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Racial unsympathy",
                 "Black laz. stereo.",
                 "Anti-Black stereo. (3-item index)",
                 "Ethnocentrism (6-item index)",
                 "Racial resent. (4-item index) ", 
                 "Constant")

stargazer::stargazer(h25b_lm,
                     se = h25b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h25b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h25b-with-party-tab",
                     out = "regression-tables/sec-app-h25b-with-party-tab.tex",
                     title = "Test of hypothesis 25b"
                     )
```

# Hypothesis 26b {-}

"H26b. Disaster spending support is predicted by the general index of all stereotypes even after controlling for each of the following in turn: 
1)	Black laziness stereotype 
2)	Index of all Black stereotypes 
3)	Racial resentment
4)	Racial sympathy"

```{r h26b-tab, include = FALSE}

h26b_lm_1 <- lm(more_spending ~ age + gender + educ + income + stype_index + black_laziness, data = survey_2_white, weights = weights) 
h26b_se_1 <- sqrt(diag(sandwich::vcovHC(h26b_lm_1, type = "HC1")))

h26b_lm_2 <- lm(more_spending ~ age + gender + educ + income + stype_index + stype_index_black, data = survey_2_white, weights = weights) 
h26b_se_2 <- sqrt(diag(sandwich::vcovHC(h26b_lm_2, type = "HC1")))

h26b_lm_3 <- lm(more_spending ~ age + gender + educ + income + stype_index + rr_index, data = survey_2_white, weights = weights) 
h26b_se_3 <- sqrt(diag(sandwich::vcovHC(h26b_lm_3, type = "HC1")))

h26b_lm_4 <- lm(more_spending ~ age + gender + educ + income + stype_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h26b_se_4 <- sqrt(diag(sandwich::vcovHC(h26b_lm_4, type = "HC1")))

h26b_lm_5 <- lm(more_spending ~ age + gender + educ + income + party + stype_index + black_laziness, data = survey_2_white, weights = weights) 
h26b_se_5 <- sqrt(diag(sandwich::vcovHC(h26b_lm_5, type = "HC1")))

h26b_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + stype_index + stype_index_black, data = survey_2_white, weights = weights) 
h26b_se_6 <- sqrt(diag(sandwich::vcovHC(h26b_lm_6, type = "HC1")))

h26b_lm_7 <- lm(more_spending ~ age + gender + educ + income + party + stype_index + rr_index, data = survey_2_white, weights = weights) 
h26b_se_7 <- sqrt(diag(sandwich::vcovHC(h26b_lm_7, type = "HC1")))

h26b_lm_8 <- lm(more_spending ~ age + gender + educ + income + party + stype_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h26b_se_8 <- sqrt(diag(sandwich::vcovHC(h26b_lm_8, type = "HC1")))

h26b_lm <- list(h26b_lm_1,
                h26b_lm_2,
                h26b_lm_3,
                h26b_lm_4,
                h26b_lm_5,
                h26b_lm_6,
                h26b_lm_7,
                h26b_lm_8)

h26b_se <- list(h26b_se_1,
                h26b_se_2,
                h26b_se_3,
                h26b_se_4,
                h26b_se_5,
                h26b_se_6,
                h26b_se_7,
                h26b_se_8)

h26b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Ethnocentrism (6-item index)",
                 "Black laz. stereo.",
                 "Anti-Black stereo. (3-item index)",
                 "Racial resent. (4-item index) ", 
                 "Racial unsympathy",
                 "Constant")

stargazer::stargazer(h26b_lm,
                     se = h26b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h26b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h26b-with-party-tab",
                     out = "regression-tables/sec-app-h26b-with-party-tab.tex",
                     title = "Test of hypothesis 26b"
                     )
```

# Hypothesis 27b {-}

"H27b. Disaster spending support is predicted by racial resentment even after controlling for each of the following in turn:
1)	Black laziness stereotype 
2)	Index of all Black stereotypes 
3)	The general stereotype index
4)	Racial sympathy"

```{r h27b-tab, include = FALSE}

h27b_lm_1 <- lm(more_spending ~ age + gender + educ + income + rr_index + black_laziness, data = survey_2_white, weights = weights) 
h27b_se_1 <- sqrt(diag(sandwich::vcovHC(h27b_lm_1, type = "HC1")))

h27b_lm_2 <- lm(more_spending ~ age + gender + educ + income + rr_index + stype_index_black, data = survey_2_white, weights = weights) 
h27b_se_2 <- sqrt(diag(sandwich::vcovHC(h27b_lm_2, type = "HC1")))

h27b_lm_3 <- lm(more_spending ~ age + gender + educ + income + rr_index + stype_index, data = survey_2_white, weights = weights) 
h27b_se_3 <- sqrt(diag(sandwich::vcovHC(h27b_lm_3, type = "HC1")))

h27b_lm_4 <- lm(more_spending ~ age + gender + educ + income + rr_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h27b_se_4 <- sqrt(diag(sandwich::vcovHC(h27b_lm_4, type = "HC1")))

h27b_lm_5 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + black_laziness, data = survey_2_white, weights = weights) 
h27b_se_5 <- sqrt(diag(sandwich::vcovHC(h27b_lm_5, type = "HC1")))

h27b_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + stype_index_black, data = survey_2_white, weights = weights) 
h27b_se_6 <- sqrt(diag(sandwich::vcovHC(h27b_lm_6, type = "HC1")))

h27b_lm_7 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + stype_index, data = survey_2_white, weights = weights) 
h27b_se_7 <- sqrt(diag(sandwich::vcovHC(h27b_lm_7, type = "HC1")))

h27b_lm_8 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h27b_se_8 <- sqrt(diag(sandwich::vcovHC(h27b_lm_8, type = "HC1")))

h27b_lm <- list(h27b_lm_1,
                h27b_lm_2,
                h27b_lm_3,
                h27b_lm_4,
                h27b_lm_5,
                h27b_lm_6,
                h27b_lm_7,
                h27b_lm_8)

h27b_se <- list(h27b_se_1,
                h27b_se_2,
                h27b_se_3,
                h27b_se_4,
                h27b_se_5,
                h27b_se_6,
                h27b_se_7,
                h27b_se_8)

h27b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Racial resent. (4-item index) ", 
                 "Black laz. stereo.",
                 "Anti-Black stereo. (3-item index)",
                 "Ethnocentrism (6-item index)",
                 "Racial unsympathy",
                 "Constant")

stargazer::stargazer(h27b_lm,
                     se = h27b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h27b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h27b-with-party-tab",
                     out = "regression-tables/sec-app-h27b-with-party-tab.tex",
                     title = "Test of hypothesis 27b"
                     )
```

# Hypothesis 27c {-}

"H27c. Racial resentment will be a better predictor of support for disaster spending than racial sympathy. However, even if this hypothesis is true, it may be due to more measurement error in the single item racial sympathy measure than in the racial resentment index."

```{r h27c-tab, include = FALSE}

h27c_lm_1 <- lm(more_spending ~ age + gender + educ + income + rr_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h27c_se_1 <- sqrt(diag(sandwich::vcovHC(h27c_lm_1, type = "HC1")))

h27c_lm_2 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h27c_se_2 <- sqrt(diag(sandwich::vcovHC(h27c_lm_2, type = "HC1")))

h27c_lm <- list(h27c_lm_1,
                h27c_lm_2)

h27c_se <- list(h27c_se_1,
                h27c_se_2)

h27c_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Racial resent. (4-item index) ", 
                 "Racial unsympathy",
                 "Constant")

stargazer::stargazer(h27c_lm,
                     se = h27c_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h27c_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h27c-with-party-tab",
                     out = "regression-tables/sec-app-h27c-with-party-tab.tex",
                     title = "Test of hypothesis 27c"
                     )
```

# Hypothesis 27d {-}

"H27d. Racial resentment will be a better predictor of support for disaster spending than the Black laziness stereotype, the index of all Black stereotypes, and the general index of racial stereotypes."

```{r h27d-tab, include = FALSE}

h27d_lm_1 <- lm(more_spending ~ age + gender + educ + income + rr_index + black_laziness, data = survey_2_white, weights = weights) 
h27d_se_1 <- sqrt(diag(sandwich::vcovHC(h27d_lm_1, type = "HC1")))

h27d_lm_2 <- lm(more_spending ~ age + gender + educ + income + rr_index + stype_index_black, data = survey_2_white, weights = weights) 
h27d_se_2 <- sqrt(diag(sandwich::vcovHC(h27d_lm_2, type = "HC1")))

h27d_lm_3 <- lm(more_spending ~ age + gender + educ + income + rr_index + stype_index, data = survey_2_white, weights = weights) 
h27d_se_3 <- sqrt(diag(sandwich::vcovHC(h27d_lm_3, type = "HC1")))

h27d_lm_4 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + black_laziness, data = survey_2_white, weights = weights) 
h27d_se_4 <- sqrt(diag(sandwich::vcovHC(h27d_lm_4, type = "HC1")))

h27d_lm_5 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + stype_index_black, data = survey_2_white, weights = weights) 
h27d_se_5 <- sqrt(diag(sandwich::vcovHC(h27d_lm_5, type = "HC1")))

h27d_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + stype_index, data = survey_2_white, weights = weights) 
h27d_se_6 <- sqrt(diag(sandwich::vcovHC(h27d_lm_6, type = "HC1")))

h27d_lm <- list(h27d_lm_1,
                h27d_lm_2,
                h27d_lm_3,
                h27d_lm_4,
                h27d_lm_5,
                h27d_lm_6)

h27d_se <- list(h27d_se_1,
                h27d_se_2,
                h27d_se_3,
                h27d_se_4,
                h27d_se_5,
                h27d_se_6)

h27d_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Racial resent. (4-item index) ", 
                 "Black laz. stereo.",
                 "Anti-Black stereo. (3-item index)",
                 "Ethnocentrism (6-item index)",
                 "Constant")

stargazer::stargazer(h27d_lm,
                     se = h27d_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h27d_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h27d-with-party-tab",
                     out = "regression-tables/sec-app-h27d-with-party-tab.tex",
                     title = "Test of hypothesis 27d"
                     )
```

# Hypothesis 28 {-}

"H28. When using discrete measures of the strong racial attitudes, low will be a better predictor of support for disaster spending than high (with middle as the baseline)."

```{r h28-tab, include = FALSE}

h28_lm_1 <- lm(more_spending ~ age + gender + educ + income + racial_sympathy_anes_discrete, data = survey_2_white, weights = weights) 
h28_se_1 <- sqrt(diag(sandwich::vcovHC(h28_lm_1, type = "HC1")))

h28_lm_2 <- lm(more_spending ~ age + gender + educ + income + rr_index_discrete, data = survey_2_white, weights = weights) 
h28_se_2 <- sqrt(diag(sandwich::vcovHC(h28_lm_2, type = "HC1")))

h28_lm_3 <- lm(more_spending ~ age + gender + educ + income + black_laziness_discrete, data = survey_2_white, weights = weights) 
h28_se_3 <- sqrt(diag(sandwich::vcovHC(h28_lm_3, type = "HC1")))

h28_lm_4 <- lm(more_spending ~ age + gender + educ + income + stype_index_black_discrete, data = survey_2_white, weights = weights) 
h28_se_4 <- sqrt(diag(sandwich::vcovHC(h28_lm_4, type = "HC1")))

h28_lm <- list(h28_lm_1,
                h28_lm_2,
                h28_lm_3,
                h28_lm_4)

h28_se <- list(h28_se_1,
                h28_se_2,
                h28_se_3,
                h28_se_4)

h28_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Racial unsympathy: Low", "Racial unsympathy: High",
                 "Racial resentment (4-item index): Low", "Racial resentment (4-item index): High", 
                 "Stereo. of Black laz.: Low", "Stereo. of Black laz.: High", 
                 "Anti-Black stereo. (3-item index): Low", "Anti-Black stereo. (3-item index): High", 
                 "Constant")

stargazer::stargazer(h28_lm,
                     se = h28_se,
                     dep.var.caption = "",
                     dep.var.labels = c("Blame index", "No blame", "Partial blame", "Personal respon."),
                     covariate.labels = h28_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h28-tab",
                     out = "regression-tables/sec-app-h28-tab.tex",
                     title = "Test of hypothesis 28"
                     )
```

# Hypotheses 29a {-}

"H29a. The stereotype of black laziness predicts blame."

```{r h29a-tab, include = FALSE}

h29a_lm_1 <- lm(blame_index ~ age + gender + educ + income + black_laziness, data = survey_2_white, weights = weights) 
h29a_se_1 <- sqrt(diag(sandwich::vcovHC(h29a_lm_1, type = "HC1")))

h29a_lm_2 <- lm(no_blame ~ age + gender + educ + income + black_laziness, data = survey_2_white, weights = weights) 
h29a_se_2 <- sqrt(diag(sandwich::vcovHC(h29a_lm_2, type = "HC1")))

h29a_lm_3 <- lm(partial_blame ~ age + gender + educ + income + black_laziness, data = survey_2_white, weights = weights) 
h29a_se_3 <- sqrt(diag(sandwich::vcovHC(h29a_lm_3, type = "HC1")))

h29a_lm_4 <- lm(personal_responsibility ~ age + gender + educ + income + black_laziness, data = survey_2_white, weights = weights) 
h29a_se_4 <- sqrt(diag(sandwich::vcovHC(h29a_lm_4, type = "HC1")))

h29a_lm <- list(h29a_lm_1,
                h29a_lm_2,
                h29a_lm_3,
                h29a_lm_4)

h29a_se <- list(h29a_se_1,
                h29a_se_2,
                h29a_se_3,
                h29a_se_4)

h29a_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Black laz. stereo.",
                 "Constant")

stargazer::stargazer(h29a_lm,
                     se = h29a_se,
                     dep.var.caption = "",
                     dep.var.labels = c("Blame index", "No blame", "Partial blame", "Personal respon."),
                     covariate.labels = h29a_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h29a-with-party-tab",
                     out = "regression-tables/sec-app-h29a-with-party-tab.tex",
                     title = "Test of hypothesis 29a"
                     )
```

# Hypotheses 29b {-}

"H29b. Racial resentment predicts blame."

```{r h29b-tab, include = FALSE}

h29b_lm_1 <- lm(blame_index ~ age + gender + educ + income + rr_index, data = survey_2_white, weights = weights) 
h29b_se_1 <- sqrt(diag(sandwich::vcovHC(h29b_lm_1, type = "HC1")))

h29b_lm_2 <- lm(no_blame ~ age + gender + educ + income + rr_index, data = survey_2_white, weights = weights) 
h29b_se_2 <- sqrt(diag(sandwich::vcovHC(h29b_lm_2, type = "HC1")))

h29b_lm_3 <- lm(partial_blame ~ age + gender + educ + income + rr_index, data = survey_2_white, weights = weights) 
h29b_se_3 <- sqrt(diag(sandwich::vcovHC(h29b_lm_3, type = "HC1")))

h29b_lm_4 <- lm(personal_responsibility ~ age + gender + educ + income + rr_index, data = survey_2_white, weights = weights) 
h29b_se_4 <- sqrt(diag(sandwich::vcovHC(h29b_lm_4, type = "HC1")))

h29b_lm <- list(h29b_lm_1,
                h29b_lm_2,
                h29b_lm_3,
                h29b_lm_4)

h29b_se <- list(h29b_se_1,
                h29b_se_2,
                h29b_se_3,
                h29b_se_4)

h29b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Racial resentment (4-item index)",
                 "Constant")

stargazer::stargazer(h29b_lm,
                     se = h29b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("Blame index", "No blame", "Partial blame", "Personal respon."),
                     covariate.labels = h29b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h29b-with-party-tab",
                     out = "regression-tables/sec-app-h29b-with-party-tab.tex",
                     title = "Test of hypothesis 29b"
                     )
```

# Hypothesis 30a {-}

"H30a. Blame predicts support for disaster spending."

```{r h30a-tab, include = FALSE}

h30a_lm_1 <- lm(more_spending ~ age + gender + educ + income + blame_index, data = survey_2_white, weights = weights) 
h30a_se_1 <- sqrt(diag(sandwich::vcovHC(h30a_lm_1, type = "HC1")))

h30a_lm_2 <- lm(more_spending ~ age + gender + educ + income + no_blame, data = survey_2_white, weights = weights) 
h30a_se_2 <- sqrt(diag(sandwich::vcovHC(h30a_lm_2, type = "HC1")))

h30a_lm_3 <- lm(more_spending ~ age + gender + educ + income + partial_blame, data = survey_2_white, weights = weights) 
h30a_se_3 <- sqrt(diag(sandwich::vcovHC(h30a_lm_3, type = "HC1")))

h30a_lm_4 <- lm(more_spending ~ age + gender + educ + income + personal_responsibility, data = survey_2_white, weights = weights) 
h30a_se_4 <- sqrt(diag(sandwich::vcovHC(h30a_lm_4, type = "HC1")))

h30a_lm_5 <- lm(more_spending ~ age + gender + educ + income + party + blame_index, data = survey_2_white, weights = weights) 
h30a_se_5 <- sqrt(diag(sandwich::vcovHC(h30a_lm_5, type = "HC1")))

h30a_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + no_blame, data = survey_2_white, weights = weights) 
h30a_se_6 <- sqrt(diag(sandwich::vcovHC(h30a_lm_6, type = "HC1")))

h30a_lm_7 <- lm(more_spending ~ age + gender + educ + income + party + partial_blame, data = survey_2_white, weights = weights) 
h30a_se_7 <- sqrt(diag(sandwich::vcovHC(h30a_lm_7, type = "HC1")))

h30a_lm_8 <- lm(more_spending ~ age + gender + educ + income + party + personal_responsibility, data = survey_2_white, weights = weights) 
h30a_se_8 <- sqrt(diag(sandwich::vcovHC(h30a_lm_8, type = "HC1")))

h30a_lm <- list(h30a_lm_1,
                h30a_lm_2,
                h30a_lm_3,
                h30a_lm_4,
                h30a_lm_5,
                h30a_lm_6,
                h30a_lm_7,
                h30a_lm_8)

h30a_se <- list(h30a_se_1,
                h30a_se_2,
                h30a_se_3,
                h30a_se_4,
                h30a_se_5,
                h30a_se_6,
                h30a_se_7,
                h30a_se_8)

h30a_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Blame (3-item index) ", 
                 "No blame",
                 "Partial blame",
                 "Personal responsibility",
                 "Constant")

stargazer::stargazer(h30a_lm,
                     se = h30a_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h30a_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h30a-with-party-tab",
                     out = "regression-tables/sec-app-h30a-with-party-tab.tex",
                     title = "Test of hypothesis 30a"
                     )
```

# Hypothesis 30b {-}

"H30b. Blame predicts support for disaster spending even after controlling for each of the following in turn:
1)	The stereotype of Black laziness 
2)	Index of all Black stereotypes
3)	The general stereotype index
4)	Racial sympathy
5)  Racial resentment"

```{r h30b-tab, include = FALSE}

h30b_lm_1 <- lm(more_spending ~ age + gender + educ + income + blame_index + black_laziness, data = survey_2_white, weights = weights) 
h30b_se_1 <- sqrt(diag(sandwich::vcovHC(h30b_lm_1, type = "HC1")))

h30b_lm_2 <- lm(more_spending ~ age + gender + educ + income + blame_index + stype_index_black, data = survey_2_white, weights = weights) 
h30b_se_2 <- sqrt(diag(sandwich::vcovHC(h30b_lm_2, type = "HC1")))

h30b_lm_3 <- lm(more_spending ~ age + gender + educ + income + blame_index + stype_index, data = survey_2_white, weights = weights) 
h30b_se_3 <- sqrt(diag(sandwich::vcovHC(h30b_lm_3, type = "HC1")))

h30b_lm_4 <- lm(more_spending ~ age + gender + educ + income + blame_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h30b_se_4 <- sqrt(diag(sandwich::vcovHC(h30b_lm_4, type = "HC1")))

h30b_lm_5 <- lm(more_spending ~ age + gender + educ + income + blame_index + rr_index, data = survey_2_white, weights = weights) 
h30b_se_5 <- sqrt(diag(sandwich::vcovHC(h30b_lm_5, type = "HC1")))

h30b_lm <- list(h30b_lm_1,
                h30b_lm_2,
                h30b_lm_3,
                h30b_lm_4,
                h30b_lm_5)

h30b_se <- list(h30b_se_1,
                h30b_se_2,
                h30b_se_3,
                h30b_se_4,
                h30b_se_5)

h30b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Blame (3-item index)",
                 "Black laz. stereo.",
                 "Anti-Black stereo. (3-item index)",
                 "Ethnocentrism (6-item index)",
                 "Racial unsympathy",
                 "Racial resent. (4-item index) ", 
                 "Constant")

stargazer::stargazer(h30b_lm,
                     se = h30b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h30b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h30b-tab",
                     out = "regression-tables/sec-app-h30b-tab.tex",
                     title = "Test of hypothesis 30b"
                     )
```

```{r h30b-with-party-tab, include = FALSE}

h30b_lm_6 <- lm(more_spending ~ age + gender + educ + income + party + blame_index + black_laziness, data = survey_2_white, weights = weights) 
h30b_se_6 <- sqrt(diag(sandwich::vcovHC(h30b_lm_6, type = "HC1")))

h30b_lm_7 <- lm(more_spending ~ age + gender + educ + income + party + blame_index + stype_index_black, data = survey_2_white, weights = weights) 
h30b_se_7 <- sqrt(diag(sandwich::vcovHC(h30b_lm_7, type = "HC1")))

h30b_lm_8 <- lm(more_spending ~ age + gender + educ + income + party + blame_index + stype_index, data = survey_2_white, weights = weights) 
h30b_se_8 <- sqrt(diag(sandwich::vcovHC(h30b_lm_8, type = "HC1")))

h30b_lm_9 <- lm(more_spending ~ age + gender + educ + income + party + blame_index + racial_sympathy_anes, data = survey_2_white, weights = weights) 
h30b_se_9 <- sqrt(diag(sandwich::vcovHC(h30b_lm_9, type = "HC1")))

h30b_lm_10 <- lm(more_spending ~ age + gender + educ + income + party + blame_index + rr_index, data = survey_2_white, weights = weights) 
h30b_se_10 <- sqrt(diag(sandwich::vcovHC(h30b_lm_10, type = "HC1")))


h30b_lm <- list(h30b_lm_6,
                h30b_lm_7,
                h30b_lm_8,
                h30b_lm_9,
                h30b_lm_10)

h30b_se <- list(h30b_se_6,
                h30b_se_7,
                h30b_se_8,
                h30b_se_9,
                h30b_se_10)

h30b_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Blame (3-item index)",
                 "Black laz. stereo.",
                 "Anti-Black stereo. (3-item index)",
                 "Ethnocentrism (6-item index)",
                 "Racial unsympathy",
                 "Racial resent. (4-item index) ", 
                 "Constant")

stargazer::stargazer(h30b_lm,
                     se = h30b_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h30b_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h30b-with-party-tab",
                     out = "regression-tables/sec-app-h30b-with-party-tab.tex",
                     title = "Test of hypothesis 30b, with control for party ID"
                     )

```

# Hypothesis 30c {-}

"H30c. Blame reduces the effect of racial resentment and of the stereotype of Black laziness on support for disaster spending."

```{r h30c-tab, include = FALSE}

h30c_lm_1 <- lm(more_spending ~ age + gender + educ + income + rr_index, data = survey_2_white, weights = weights) 
h30c_se_1 <- sqrt(diag(sandwich::vcovHC(h30c_lm_1, type = "HC1")))

h30c_lm_2 <- lm(more_spending ~ age + gender + educ + income + rr_index + blame_index, data = survey_2_white, weights = weights) 
h30c_se_2 <- sqrt(diag(sandwich::vcovHC(h30c_lm_2, type = "HC1")))

h30c_lm_3 <- lm(more_spending ~ age + gender + educ + income + party + rr_index, data = survey_2_white, weights = weights) 
h30c_se_3 <- sqrt(diag(sandwich::vcovHC(h30c_lm_3, type = "HC1")))

h30c_lm_4 <- lm(more_spending ~ age + gender + educ + income + party + rr_index + blame_index, data = survey_2_white, weights = weights) 
h30c_se_4 <- sqrt(diag(sandwich::vcovHC(h30c_lm_4, type = "HC1")))

h30c_lm_5 <- lm(more_spending ~ age + gender + educ + income + black_laziness, data = survey_2_white, weights = weights) 
h30c_se_5 <- sqrt(diag(sandwich::vcovHC(h30c_lm_5, type = "HC1")))

h30c_lm_6 <- lm(more_spending ~ age + gender + educ + income + black_laziness + blame_index, data = survey_2_white, weights = weights) 
h30c_se_6 <- sqrt(diag(sandwich::vcovHC(h30c_lm_6, type = "HC1")))

h30c_lm_7 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness, data = survey_2_white, weights = weights) 
h30c_se_7 <- sqrt(diag(sandwich::vcovHC(h30c_lm_7, type = "HC1")))

h30c_lm_8 <- lm(more_spending ~ age + gender + educ + income + party + black_laziness + blame_index, data = survey_2_white, weights = weights) 
h30c_se_8 <- sqrt(diag(sandwich::vcovHC(h30c_lm_8, type = "HC1")))

h30c_lm <- list(h30c_lm_1,
                h30c_lm_2,
                h30c_lm_3,
                h30c_lm_4,
                h30c_lm_5,
                h30c_lm_6,
                h30c_lm_7,
                h30c_lm_8)

h30c_se <- list(h30c_se_1,
                h30c_se_2,
                h30c_se_3,
                h30c_se_4,
                h30c_se_5,
                h30c_se_6,
                h30c_se_7,
                h30c_se_8)

h30c_labels <- c("Age: 40-59", "Age: 60+",
                 "Gender: Female", "Gender: Other",
                 "Educ: Some college", "Educ: BA or more",
                 "Income: 75-150k", "Income: 150k+",
                 "Party: Independent", "Party: Republican",
                 "Racial resent. (4-item index) ", 
                 "Blame (3-item index)",
                 "Black laz. stereo.",
                 "Constant")

stargazer::stargazer(h30c_lm,
                     se = h30c_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More on disasters"),
                     covariate.labels = h30c_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h30c-with-party-tab",
                     out = "regression-tables/sec-app-h30c-with-party-tab.tex",
                     title = "Test of hypothesis 30c"
                     )
```

# Hypothesis 33 {-}

"H33. Black respondents score lower than White respondents on each of the following in turn:
1)	The stereotype of Black laziness 
2)	Index of all Black stereotypes
3)	The general stereotype index
4)   Racial sympathy
5)   Racial resentment
6)   Blame"

```{r h33-tab, include = FALSE}

h33_lm_1 <- lm(black_laziness ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h33_se_1 <- sqrt(diag(sandwich::vcovHC(h33_lm_1, type = "HC1")))

h33_lm_2 <- lm(stype_index_black ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h33_se_2 <- sqrt(diag(sandwich::vcovHC(h33_lm_2, type = "HC1")))

h33_lm_3 <- lm(stype_index ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h33_se_3 <- sqrt(diag(sandwich::vcovHC(h33_lm_3, type = "HC1")))

h33_lm_4 <- lm(racial_sympathy_anes ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h33_se_4 <- sqrt(diag(sandwich::vcovHC(h33_lm_4, type = "HC1")))

h33_lm_5 <- lm(rr_index ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h33_se_5 <- sqrt(diag(sandwich::vcovHC(h33_lm_5, type = "HC1")))

h33_lm_6 <- lm(blame_index ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h33_se_6 <- sqrt(diag(sandwich::vcovHC(h33_lm_6, type = "HC1")))

h33_lm <- list(h33_lm_1,
               h33_lm_2,
               h33_lm_3,
               h33_lm_4,
               h33_lm_5,
               h33_lm_6)

h33_se <- list(h33_se_1,
               h33_se_2,
               h33_se_3,
               h33_se_4,
               h33_se_5,
               h33_se_6)

h33_labels <- c("Race: Black", "Race: Latinx", "Race: Asian", "Race: Other",
                "Age: 40-59", "Age: 60+",
                "Gender: Female", "Gender: Other",
                "Educ: Some college", "Educ: BA or more",
                "Income: 75-150k", "Income: 150k+",
                "Constant")

stargazer::stargazer(h33_lm,
                     se = h33_se,
                     dep.var.caption = "",
                     dep.var.labels = c("Stereo. of Black laz.", "Anti-Black stereo.", "Ethnocen.", "Racial unsympathy", "Racial resent.", "Blame"),
                     covariate.labels = h33_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h33-tab",
                     out = "regression-tables/sec-app-h33-tab.tex",
                     title = "Test of hypothesis 33"
                     )
```

```{r h33-with-party-tab, include = FALSE}

h33_lm_1 <- lm(black_laziness ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h33_se_1 <- sqrt(diag(sandwich::vcovHC(h33_lm_1, type = "HC1")))

h33_lm_2 <- lm(stype_index_black ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h33_se_2 <- sqrt(diag(sandwich::vcovHC(h33_lm_2, type = "HC1")))

h33_lm_3 <- lm(stype_index ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h33_se_3 <- sqrt(diag(sandwich::vcovHC(h33_lm_3, type = "HC1")))

h33_lm_4 <- lm(racial_sympathy_anes ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h33_se_4 <- sqrt(diag(sandwich::vcovHC(h33_lm_4, type = "HC1")))

h33_lm_5 <- lm(rr_index ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h33_se_5 <- sqrt(diag(sandwich::vcovHC(h33_lm_5, type = "HC1")))

h33_lm_6 <- lm(blame_index ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h33_se_6 <- sqrt(diag(sandwich::vcovHC(h33_lm_6, type = "HC1")))

h33_lm <- list(h33_lm_1,
               h33_lm_2,
               h33_lm_3,
               h33_lm_4,
               h33_lm_5,
               h33_lm_6)

h33_se <- list(h33_se_1,
               h33_se_2,
               h33_se_3,
               h33_se_4,
               h33_se_5,
               h33_se_6)

h33_labels <- c("Race: Black", "Race: Latinx", "Race: Asian", "Race: Other",
                "Age: 40-59", "Age: 60+",
                "Gender: Female", "Gender: Other",
                "Educ: Some college", "Educ: BA or more",
                "Income: 75-150k", "Income: 150k+",
                "Party: Independent", "Party: Republican",
                "Constant")

stargazer::stargazer(h33_lm,
                     se = h33_se,
                     dep.var.caption = "",
                     dep.var.labels = c("Stereo. of Black laz.", "Anti-Black stereo.", "Ethnocen.", "Racial unsympathy", "Racial resent.", "Blame"),
                     covariate.labels = h33_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h33-with-party-tab",
                     out = "regression-tables/sec-app-h33-with-party-tab.tex",
                     title = "Test of hypothesis 33, with control for party ID"
                     )
```

# Hypothesis 34 {-}

"H34. Race effects (any difference between one category and any other) on disaster spending preferences (dependent variables 1, 3, and 4) will diminish when each strong predictor in H33 is included (each in turn)."

```{r h34-disaster-tab, include = FALSE}

h34_disaster_lm_1 <- lm(more_spending ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h34_disaster_se_1 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_1, type = "HC1")))

h34_disaster_lm_2 <- lm(more_spending ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h34_disaster_se_2 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_2, type = "HC1")))

h34_disaster_lm_3 <- lm(more_spending ~ race_alt + age + gender + educ + income + racial_sympathy_anes, data = survey_2_data, weights = weights) 
h34_disaster_se_3 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_3, type = "HC1")))

h34_disaster_lm_4 <- lm(more_spending ~ race_alt + age + gender + educ + income + party + racial_sympathy_anes, data = survey_2_data, weights = weights) 
h34_disaster_se_4 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_4, type = "HC1")))

h34_disaster_lm_5 <- lm(more_spending ~ race_alt + age + gender + educ + income + rr_index, data = survey_2_data, weights = weights) 
h34_disaster_se_5 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_5, type = "HC1")))

h34_disaster_lm_6 <- lm(more_spending ~ race_alt + age + gender + educ + income + party + rr_index, data = survey_2_data, weights = weights) 
h34_disaster_se_6 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_6, type = "HC1")))

h34_disaster_lm_7 <- lm(more_spending ~ race_alt + age + gender + educ + income + blame_index, data = survey_2_data, weights = weights) 
h34_disaster_se_7 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_7, type = "HC1")))

h34_disaster_lm_8 <- lm(more_spending ~ race_alt + age + gender + educ + income + party + blame_index, data = survey_2_data, weights = weights) 
h34_disaster_se_8 <- sqrt(diag(sandwich::vcovHC(h34_disaster_lm_8, type = "HC1")))

h34_disaster_lm <- list(h34_disaster_lm_1,
                        h34_disaster_lm_2,
                        h34_disaster_lm_3,
                        h34_disaster_lm_4,
                        h34_disaster_lm_5,
                        h34_disaster_lm_6,
                        h34_disaster_lm_7,
                        h34_disaster_lm_8)

h34_disaster_se <- list(h34_disaster_se_1,
                        h34_disaster_se_2,
                        h34_disaster_se_3,
                        h34_disaster_se_4,
                        h34_disaster_se_5,
                        h34_disaster_se_6,
                        h34_disaster_se_7,
                        h34_disaster_se_8)

h34_disaster_labels <- c("Race: Black", "Race: Latinx", "Race: Asian", "Race: Other",
                         "Age: 40-59", "Age: 60+",
                         "Gender: Female", "Gender: Other",
                         "Educ: Some college", "Educ: BA or more",
                         "Income: 75-150k", "Income: 150k+",
                         "Party: Independent", "Party: Republican",
                         "Racial unsympathy", 
                         "Racial resent. (4-item index)",
                         "Blame (3-item index)",
                         "Constant")

stargazer::stargazer(h34_disaster_lm,
                     se = h34_disaster_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More spending"),
                     covariate.labels = h34_disaster_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h34-with-party-tab",
                     out = "regression-tables/sec-app-h34-with-party-tab.tex",
                     title = "Test of hypothesis 34 on dependent variable 3"
                     )

```

```{r h34-relief-tab, include = FALSE}

h34_relief_lm_1 <- lm(more_relief ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h34_relief_se_1 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_1, type = "HC1")))

h34_relief_lm_2 <- lm(more_relief ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h34_relief_se_2 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_2, type = "HC1")))

h34_relief_lm_3 <- lm(more_relief ~ race_alt + age + gender + educ + income + racial_sympathy_anes, data = survey_2_data, weights = weights) 
h34_relief_se_3 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_3, type = "HC1")))

h34_relief_lm_4 <- lm(more_relief ~ race_alt + age + gender + educ + income + party + racial_sympathy_anes, data = survey_2_data, weights = weights) 
h34_relief_se_4 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_4, type = "HC1")))

h34_relief_lm_5 <- lm(more_relief ~ race_alt + age + gender + educ + income + rr_index, data = survey_2_data, weights = weights) 
h34_relief_se_5 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_5, type = "HC1")))

h34_relief_lm_6 <- lm(more_relief ~ race_alt + age + gender + educ + income + party + rr_index, data = survey_2_data, weights = weights) 
h34_relief_se_6 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_6, type = "HC1")))

h34_relief_lm_7 <- lm(more_relief ~ race_alt + age + gender + educ + income + blame_index, data = survey_2_data, weights = weights) 
h34_relief_se_7 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_7, type = "HC1")))

h34_relief_lm_8 <- lm(more_relief ~ race_alt + age + gender + educ + income + party + blame_index, data = survey_2_data, weights = weights) 
h34_relief_se_8 <- sqrt(diag(sandwich::vcovHC(h34_relief_lm_8, type = "HC1")))

h34_relief_lm <- list(h34_relief_lm_1,
                        h34_relief_lm_2,
                        h34_relief_lm_3,
                        h34_relief_lm_4,
                        h34_relief_lm_5,
                        h34_relief_lm_6,
                        h34_relief_lm_7,
                        h34_relief_lm_8)

h34_relief_se <- list(h34_relief_se_1,
                        h34_relief_se_2,
                        h34_relief_se_3,
                        h34_relief_se_4,
                        h34_relief_se_5,
                        h34_relief_se_6,
                        h34_relief_se_7,
                        h34_relief_se_8)

h34_relief_labels <- c("Race: Black", "Race: Latinx", "Race: Asian", "Race: Other",
                         "Age: 40-59", "Age: 60+",
                         "Gender: Female", "Gender: Other",
                         "Educ: Some college", "Educ: BA or more",
                         "Income: 75-150k", "Income: 150k+",
                         "Party: Independent", "Party: Republican",
                         "Racial unsympathy", 
                         "Racial resent. (4-item index)",
                         "Blame (3-item index)",
                         "Constant")

stargazer::stargazer(h34_relief_lm,
                     se = h34_relief_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More relief spending"),
                     covariate.labels = h34_relief_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h34-relief-with-party-tab",
                     out = "regression-tables/sec-app-h34-relief-with-party-tab.tex",
                     title = "Test of hypothesis 34 on dependent variable 4"
                     )

```

```{r h34-prevention-tab, include = FALSE}

h34_prevention_lm_1 <- lm(more_prevention ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h34_prevention_se_1 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_1, type = "HC1")))

h34_prevention_lm_2 <- lm(more_prevention ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h34_prevention_se_2 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_2, type = "HC1")))

h34_prevention_lm_3 <- lm(more_prevention ~ race_alt + age + gender + educ + income + racial_sympathy_anes, data = survey_2_data, weights = weights) 
h34_prevention_se_3 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_3, type = "HC1")))

h34_prevention_lm_4 <- lm(more_prevention ~ race_alt + age + gender + educ + income + party + racial_sympathy_anes, data = survey_2_data, weights = weights) 
h34_prevention_se_4 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_4, type = "HC1")))

h34_prevention_lm_5 <- lm(more_prevention ~ race_alt + age + gender + educ + income + rr_index, data = survey_2_data, weights = weights) 
h34_prevention_se_5 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_5, type = "HC1")))

h34_prevention_lm_6 <- lm(more_prevention ~ race_alt + age + gender + educ + income + party + rr_index, data = survey_2_data, weights = weights) 
h34_prevention_se_6 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_6, type = "HC1")))

h34_prevention_lm_7 <- lm(more_prevention ~ race_alt + age + gender + educ + income + blame_index, data = survey_2_data, weights = weights) 
h34_prevention_se_7 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_7, type = "HC1")))

h34_prevention_lm_8 <- lm(more_prevention ~ race_alt + age + gender + educ + income + party + blame_index, data = survey_2_data, weights = weights) 
h34_prevention_se_8 <- sqrt(diag(sandwich::vcovHC(h34_prevention_lm_8, type = "HC1")))

h34_prevention_lm <- list(h34_prevention_lm_1,
                        h34_prevention_lm_2,
                        h34_prevention_lm_3,
                        h34_prevention_lm_4,
                        h34_prevention_lm_5,
                        h34_prevention_lm_6,
                        h34_prevention_lm_7,
                        h34_prevention_lm_8)

h34_prevention_se <- list(h34_prevention_se_1,
                        h34_prevention_se_2,
                        h34_prevention_se_3,
                        h34_prevention_se_4,
                        h34_prevention_se_5,
                        h34_prevention_se_6,
                        h34_prevention_se_7,
                        h34_prevention_se_8)

h34_prevention_labels <- c("Race: Black", "Race: Latinx", "Race: Asian", "Race: Other",
                         "Age: 40-59", "Age: 60+",
                         "Gender: Female", "Gender: Other",
                         "Educ: Some college", "Educ: BA or more",
                         "Income: 75-150k", "Income: 150k+",
                         "Party: Independent", "Party: Republican",
                         "Racial unsympathy", 
                         "Racial resent. (4-item index)",
                         "Blame (3-item index)",
                         "Constant")

stargazer::stargazer(h34_prevention_lm,
                     se = h34_prevention_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More prevention spending"),
                     covariate.labels = h34_prevention_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h34-prevention-with-party-tab",
                     out = "regression-tables/sec-app-h34-prevention-with-party-tab.tex",
                     title = "Test of hypothesis 34 on dependent variable 1"
                     )
```

# Hypothesis 38 {-}

"H38. Race effects on support for spending more on natural and public health disasters will be larger in 2021 than 2023. We will test this in separate regressions of overall spending, spending on disaster relief, and spending on disaster prevention (dependent variables 1, 3, and 4), including demographic controls. We will add party identification as a robustness check."

```{r h38-relief-tab, include = FALSE}

h38_relief_lm_1 <- lm(more_relief ~ race_alt + age + gender + educ + income, data = survey_1_data, weights = weights) 
h38_relief_se_1 <- sqrt(diag(sandwich::vcovHC(h38_relief_lm_1, type = "HC1")))

h38_relief_lm_2 <- lm(more_relief ~ race_alt + age + gender + educ + income + party, data = survey_1_data, weights = weights) 
h38_relief_se_2 <- sqrt(diag(sandwich::vcovHC(h38_relief_lm_2, type = "HC1")))

h38_relief_lm_3 <- lm(more_relief ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h38_relief_se_3 <- sqrt(diag(sandwich::vcovHC(h38_relief_lm_3, type = "HC1")))

h38_relief_lm_4 <- lm(more_relief ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h38_relief_se_4 <- sqrt(diag(sandwich::vcovHC(h38_relief_lm_4, type = "HC1")))

h38_relief_lm_5 <- lm(more_relief ~ race_alt*survey_year + age + gender + educ + income, data = combined_surveys, weights = weights) 
h38_relief_se_5 <- sqrt(diag(sandwich::vcovHC(h38_relief_lm_5, type = "HC1")))

h38_relief_lm_6 <- lm(more_relief ~ race_alt*survey_year + age + gender + educ + income + party, data = combined_surveys, weights = weights) 
h38_relief_se_6 <- sqrt(diag(sandwich::vcovHC(h38_relief_lm_6, type = "HC1")))

h38_relief_lm <- list(h38_relief_lm_1,
                      h38_relief_lm_2,
                      h38_relief_lm_3,
                      h38_relief_lm_4,
                      h38_relief_lm_5,
                      h38_relief_lm_6)

h38_relief_se <- list(h38_relief_se_1,
                      h38_relief_se_2,
                      h38_relief_se_3,
                      h38_relief_se_4,
                      h38_relief_se_5,
                      h38_relief_se_6)

h38_labels <- c("Race: Black", "Race: Latinx", "Race: Asian", "Race: Other", "Race: Missing", 
                "Survey year: 2023",
                "Age: 40-59", "Age: 60+",
                "Gender: Female", "Gender: Other",
                "Educ: Some college", "Educ: BA or more",
                "Income: 75-150k", "Income: 150k+",
                "Party: Independent", "Party: Republican",
                "Race: Black X Survey year: 2023", "Race: Latinx X Survey year: 2023", "Race: Asian X Survey year: 2023", "Race: Other X Survey year: 2023", "Race: Missing X Survey year: 2023", 
                "Constant")

stargazer::stargazer(h38_relief_lm,
                     se = h38_relief_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More relief spending"),
                     covariate.labels = h38_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h38-relief-with-party-tab",
                     out = "regression-tables/sec-app-h38-relief-with-party-tab.tex",
                     title = "Test of hypothesis 38 on dependent variable 4"
                     )
```

```{r h38-prevention-tab, include = FALSE}

h38_prev_lm_1 <- lm(more_prevention ~ race_alt + age + gender + educ + income, data = survey_1_data, weights = weights) 
h38_prev_se_1 <- sqrt(diag(sandwich::vcovHC(h38_prev_lm_1, type = "HC1")))

h38_prev_lm_2 <- lm(more_prevention ~ race_alt + age + gender + educ + income + party, data = survey_1_data, weights = weights) 
h38_prev_se_2 <- sqrt(diag(sandwich::vcovHC(h38_prev_lm_2, type = "HC1")))

h38_prev_lm_3 <- lm(more_prevention ~ race_alt + age + gender + educ + income, data = survey_2_data, weights = weights) 
h38_prev_se_3 <- sqrt(diag(sandwich::vcovHC(h38_prev_lm_3, type = "HC1")))

h38_prev_lm_4 <- lm(more_prevention ~ race_alt + age + gender + educ + income + party, data = survey_2_data, weights = weights) 
h38_prev_se_4 <- sqrt(diag(sandwich::vcovHC(h38_prev_lm_4, type = "HC1")))

h38_prev_lm_5 <- lm(more_prevention ~ race_alt*survey_year + age + gender + educ + income, data = combined_surveys, weights = weights) 
h38_prev_se_5 <- sqrt(diag(sandwich::vcovHC(h38_prev_lm_5, type = "HC1")))

h38_prev_lm_6 <- lm(more_prevention ~ race_alt*survey_year + age + gender + educ + income + party, data = combined_surveys, weights = weights) 
h38_prev_se_6 <- sqrt(diag(sandwich::vcovHC(h38_prev_lm_6, type = "HC1")))

h38_prev_lm <- list(h38_prev_lm_1,
                    h38_prev_lm_2,
                    h38_prev_lm_3,
                    h38_prev_lm_4,
                    h38_prev_lm_5,
                    h38_prev_lm_6)

h38_prev_se <- list(h38_prev_se_1,
                    h38_prev_se_2,
                    h38_prev_se_3,
                    h38_prev_se_4,
                    h38_prev_se_5,
                    h38_prev_se_6)

h38_labels <- c("Race: Black", "Race: Latinx", "Race: Asian", "Race: Other", "Race: Missing", 
                "Survey year: 2023",
                "Age: 40-59", "Age: 60+",
                "Gender: Female", "Gender: Other",
                "Educ: Some college", "Educ: BA or more",
                "Income: 75-150k", "Income: 150k+",
                "Party: Independent", "Party: Republican",
                "Race: Black X Survey year: 2023", "Race: Latinx X Survey year: 2023", "Race: Asian X Survey year: 2023", "Race: Other X Survey year: 2023", "Race: Missing X Survey year: 2023", 
                "Constant")

stargazer::stargazer(h38_prev_lm,
                     se = h38_prev_se,
                     dep.var.caption = "",
                     dep.var.labels = c("More prevention spending"),
                     covariate.labels = h38_labels,
                     star.cutoffs = c(0.05, 0.01, 0.001),
                     no.space = TRUE,
                     df = FALSE,
                     header = FALSE,
                     omit.stat = c("f"),
                     font.size = "scriptsize",
                     label = "sec-app-h38-prev-with-party-tab",
                     out = "regression-tables/sec-app-h38-prev-with-party-tab.tex",
                     title = "Test of hypothesis 38 on dependent variable 1"
                     )
```


